home *** CD-ROM | disk | FTP | other *** search
/ This Disc Bytes! / Power Computing - The Disc 2 - This Disc Bytes.ISO / mac / CodeWarrior 7 Lite for 68K / MacOS Support / Headers / Universal Headers / SoundComponents.h < prev    next >
Text File  |  1995-07-06  |  17KB  |  454 lines

  1. /*
  2.      File:        SoundComponents.h
  3.  
  4.      Contains:    Sound Components Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __SOUNDCOMPONENTS__
  21. #define __SOUNDCOMPONENTS__
  22.  
  23. #ifndef rez
  24.  
  25. #ifndef __TYPES__
  26. #include <Types.h>
  27. #endif
  28. /*    #include <ConditionalMacros.h>                                */
  29.  
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. /*    #include <MixedMode.h>                                        */
  34.  
  35. #ifndef __SOUND__
  36. #include <Sound.h>
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_ALIGN_SUPPORTED
  44. #pragma options align=mac68k
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT_SUPPORTED
  48. #pragma import on
  49. #endif
  50.  
  51. #endif /* rez */
  52.  
  53.  
  54. /*
  55.                         * * *  N O T E  * * *
  56.  
  57.     This file has been updated to include Sound Manager 3.1 interfaces.
  58.  
  59.     Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  60.     that originally shipped with the PowerMacs. These missing functions and the
  61.     new 3.1 interfaces have been released in the SoundLib library for PowerPC
  62.     developers to link with. The runtime library for these functions are
  63.     installed by Sound Manager 3.1. The following functions are found in SoundLib.
  64.  
  65.         AudioGetBass, AudioGetInfo, AudioGetMute, AudioGetOutputDevice,
  66.         AudioGetTreble, AudioGetVolume, AudioMuteOnEvent, AudioSetBass,
  67.         AudioSetMute, AudioSetToDefaults, AudioSetTreble, AudioSetVolume,
  68.         OpenMixerSoundComponent, CloseMixerSoundComponent, SoundComponentAddSource,
  69.         SoundComponentGetInfo, SoundComponentGetSource, SoundComponentGetSourceData,
  70.         SoundComponentInitOutputDevice, SoundComponentPauseSource,
  71.         SoundComponentPlaySourceBuffer, SoundComponentRemoveSource,
  72.         SoundComponentSetInfo, SoundComponentSetOutput, SoundComponentSetSource,
  73.         SoundComponentStartSource, SoundComponentStopSource
  74. */
  75.  
  76.  
  77. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  78. /* constants*/
  79. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  80.  
  81.  
  82. /*sound component types and subtypes*/
  83. #define kNoSoundComponentType            '****'
  84.  
  85.  
  86. #define kSoundComponentType                'sift'
  87. #define     kRate8SubType                'ratb'        /*8-bit rate converter*/
  88. #define     kRate16SubType                'ratw'        /*16-bit rate converter*/
  89. #define kConverterSubType                'conv'        /*sample format converter*/
  90. #define kSndSourceSubType                'sour'        /*generic source component*/
  91.  
  92.  
  93. #define kMixerType                        'mixr'
  94. #define     kMixer8SubType                'mixb'        /*8-bit mixer*/
  95. #define     kMixer16SubType                'mixw'        /*16-bit mixer*/
  96.  
  97.  
  98. #define kSoundOutputDeviceType            'sdev'        /*sound output component*/
  99. #define        kClassicSubType                'clas'        /*classic hardware, i.e. Mac Plus*/
  100. #define     kASCSubType                    'asc '        /*Apple Sound Chip device*/
  101. #define     kDSPSubType                    'dsp '        /*DSP device*/
  102. #define     kAwacsSubType                'awac'        /*Another of Will's Audio Chips device*/
  103. #define     kGCAwacsSubType                'awgc'        /*Awacs audio with Grand Central DMA*/
  104. #define     kSingerSubType                'sing'        /*Singer (via Whitney) based sound*/
  105. #define     kSinger2SubType                'sng2'        /*Singer 2 (via Whitney) for Acme*/
  106.  
  107.  
  108. #define kSoundCompressor                'scom'
  109. #define kSoundDecompressor                'sdec'
  110. #define     kMace3SubType                'MAC3'        /*MACE 3:1*/
  111. #define     kMace6SubType                'MAC6'        /*MACE 6:1*/
  112. #define     kCDXA4SubType                'cdx4'        /*CD/XA 4:1*/
  113. #define     kCDXA2SubType                'cdx2'        /*CD/XA 2:1*/
  114. #define     kIMA4SubType                'ima4'        /*IMA 4:1*/
  115. #define     kULawSubType                'ulaw'        /*µLaw 2:1*/
  116. #define        kLittleEndianSubType        'sowt'        /*Little-endian*/
  117.  
  118.  
  119. /*Audio components and sub-types*/
  120. #define kAudioComponentType                'adio'
  121. #define        kAwacsPhoneSubType            'hphn'
  122. #define        kAudioVisionSpeakerSubType    'telc'
  123. #define        kAudioVisionHeadphoneSubType 'telh'
  124. #define        kSonyTunerSubType            'tvav'
  125.  
  126.  
  127. /*features flags*/
  128. #define k8BitRawIn                    (1 << 0)    /*data description*/
  129. #define k8BitTwosIn                    (1 << 1)
  130. #define k16BitIn                    (1 << 2)
  131. #define kStereoIn                    (1 << 3)
  132. #define k8BitRawOut                    (1 << 8)
  133. #define k8BitTwosOut                (1 << 9)
  134. #define k16BitOut                    (1 << 10)
  135. #define kStereoOut                    (1 << 11)
  136.  
  137.  
  138. #define kReverse                    0x00010000   /* (1L << 16) */ /*function description*/
  139. #define kRateConvert                0x00020000   /* (1L << 17) */
  140. #define kCreateSoundSource            0x00040000   /* (1L << 18) */
  141.  
  142.  
  143. #define kHighQuality                0x00400000   /* (1L << 22) */ /*performance description*/
  144. #define kNonRealTime                0x00800000   /* (1L << 23) */
  145.  
  146.  
  147. #ifndef rez
  148.  
  149. enum {
  150. /*sound component set/get info selectors*/
  151.     siVolume                    = 'volu',
  152.     siHardwareVolume            = 'hvol',
  153.     siSpeakerVolume                = 'svol',
  154.     siHeadphoneVolume            = 'pvol',
  155.     siHardwareVolumeSteps        = 'hstp',
  156.     siHeadphoneVolumeSteps        = 'hdst',
  157.     siHardwareMute                = 'hmut',
  158.     siSpeakerMute                = 'smut',
  159.     siHeadphoneMute                = 'pmut',
  160.     siRateMultiplier            = 'rmul',
  161.     siQuality                    = 'qual',
  162. /*format types*/
  163.     kOffsetBinary                = 'raw ',
  164.     kTwosComplement                = 'twos',
  165.     kMACE3Compression            = 'MAC3',
  166.     kMACE6Compression            = 'MAC6'
  167. };
  168.  
  169. /*quality flags*/
  170. enum {
  171. /*use interpolation in rate conversion*/
  172.     kBestQuality                = (1 << 0)
  173. };
  174.  
  175. enum {
  176. /*useful bit masks*/
  177.     kInputMask                    = 0x000000FF,                    /*masks off input bits*/
  178.     kOutputMask                    = 0x0000FF00,                    /*masks off output bits*/
  179.     kOutputShift                = 8,                            /*amount output bits are shifted*/
  180.     kActionMask                    = 0x00FF0000,                    /*masks off action bits*/
  181.     kSoundComponentBits            = 0x00FFFFFF
  182. };
  183.  
  184. enum {
  185. /*SoundComponentPlaySourceBuffer action flags*/
  186.     kSourcePaused                = (1 << 0),
  187.     kPassThrough                = (1L << 16),
  188.     kNoSoundComponentChain        = (1L << 17),
  189. /*flags for OpenMixerSoundComponent*/
  190.     kNoMixing                    = (1 << 0),                        /*don't mix source*/
  191.     kNoSampleRateConversion        = (1 << 1),                        /*don't convert sample rate (i.e. 11 kHz -> 22 kHz)*/
  192.     kNoSampleSizeConversion        = (1 << 2),                        /*don't convert sample size (i.e. 16 -> 8)*/
  193.     kNoSampleFormatConversion    = (1 << 3),                        /*don't convert sample format (i.e. 'twos' -> 'raw ')*/
  194.     kNoChannelConversion        = (1 << 4),                        /*don't convert stereo/mono*/
  195.     kNoDecompression            = (1 << 5),                        /*don't decompress (i.e. 'MAC3' -> 'raw ')*/
  196.     kNoVolumeConversion            = (1 << 6),                        /*don't apply volume*/
  197.     kNoRealtimeProcessing        = (1 << 7)                        /*won't run at interrupt time*/
  198. };
  199.  
  200. /*Audio Component constants*/
  201. enum {
  202. /*Values for whichChannel parameter*/
  203.     audioAllChannels            = 0,                            /*All channels (usually interpreted as both left and right)*/
  204.     audioLeftChannel            = 1,                            /*Left channel*/
  205.     audioRightChannel            = 2,                            /*Right channel*/
  206. /*Values for mute parameter*/
  207.     audioUnmuted                = 0,                            /*Device is unmuted*/
  208.     audioMuted                    = 1,                            /*Device is muted*/
  209. /*Capabilities flags definitions*/
  210.     audioDoesMono                = (1L << 0),                    /*Device supports mono output*/
  211.     audioDoesStereo                = (1L << 1),                    /*Device supports stereo output*/
  212.     audioDoesIndependentChannels = (1L << 2)                    /*Device supports independent software control of each channel*/
  213. };
  214.  
  215. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  216. /* typedefs*/
  217. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  218.  
  219.  
  220. /*ShortFixed consists of an 8 bit, 2's complement integer part in the high byte,*/
  221. /*with an 8 bit fractional part in the low byte; its range is -128 to 127.99609375*/
  222. typedef short ShortFixed;
  223.  
  224. typedef struct SoundComponentData SoundComponentData;
  225.  
  226. typedef struct SoundComponentData *SoundComponentDataPtr;
  227.  
  228. struct SoundComponentData {
  229.     long                            flags;
  230.     OSType                            format;
  231.     short                            numChannels;
  232.     short                            sampleSize;
  233.     UnsignedFixed                    sampleRate;
  234.     long                            sampleCount;
  235.     Byte                            *buffer;
  236.     long                            reserved;
  237. };
  238. typedef struct SoundParamBlock SoundParamBlock;
  239.  
  240. typedef SoundParamBlock *SoundParamBlockPtr;
  241.  
  242. typedef pascal Boolean (*SoundParamProcPtr)(SoundParamBlockPtr *pb);
  243.  
  244. #if GENERATINGCFM
  245. typedef UniversalProcPtr SoundParamUPP;
  246. #else
  247. typedef SoundParamProcPtr SoundParamUPP;
  248. #endif
  249.  
  250. struct SoundParamBlock {
  251.     long                            recordSize;                    /*size of this record in bytes*/
  252.     SoundComponentData                desc;                        /*description of sound buffer*/
  253.     UnsignedFixed                    rateMultiplier;                /*rate multiplier to apply to sound*/
  254.     short                            leftVolume;                    /*volumes to apply to sound*/
  255.     short                            rightVolume;
  256.     long                            quality;                    /*quality to apply to sound*/
  257.     ComponentInstance                filter;                        /*filter to apply to sound*/
  258.     SoundParamUPP                    moreRtn;                    /*routine to call to get more data*/
  259.     SoundParamUPP                    completionRtn;                /*routine to call when buffer is complete*/
  260.     long                            refCon;                        /*user refcon*/
  261.     short                            result;                        /*result*/
  262. };
  263. typedef struct privateSoundSource *SoundSource;
  264.  
  265. struct AudioInfo {
  266.     long                            capabilitiesFlags;            /*Describes device capabilities*/
  267.     long                            reserved;                    /*Reserved by Apple*/
  268.     unsigned short                    numVolumeSteps;                /*Number of significant increments between min and max volume*/
  269. };
  270. typedef struct AudioInfo AudioInfo;
  271.  
  272. typedef AudioInfo *AudioInfoPtr;
  273.  
  274. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  275. /* functions for sound components*/
  276. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  277. /*Sound Component dispatch selectors*/
  278.  
  279. enum {
  280. /*these calls cannot be delegated*/
  281.     kSoundComponentInitOutputDeviceSelect = 1,
  282.     kSoundComponentSetSourceSelect = 2,
  283.     kSoundComponentGetSourceSelect = 3,
  284.     kSoundComponentGetSourceDataSelect = 4,
  285.     kSoundComponentSetOutputSelect = 5,
  286.     kDelegatedSoundComponentSelectors = 0x0100,                    /*first selector that can be delegated up the chain*/
  287. /*these calls can be delegated and have own range*/
  288.     kSoundComponentAddSourceSelect = kDelegatedSoundComponentSelectors + 1,
  289.     kSoundComponentRemoveSourceSelect = kDelegatedSoundComponentSelectors + 2,
  290.     kSoundComponentGetInfoSelect = kDelegatedSoundComponentSelectors + 3,
  291.     kSoundComponentSetInfoSelect = kDelegatedSoundComponentSelectors + 4,
  292.     kSoundComponentStartSourceSelect = kDelegatedSoundComponentSelectors + 5,
  293.     kSoundComponentStopSourceSelect = kDelegatedSoundComponentSelectors + 6,
  294.     kSoundComponentPauseSourceSelect = kDelegatedSoundComponentSelectors + 7,
  295.     kSoundComponentPlaySourceBufferSelect = kDelegatedSoundComponentSelectors + 8
  296. };
  297.  
  298. /*Audio Component selectors*/
  299. enum {
  300.     kAudioGetVolumeSelect        = 0,
  301.     kAudioSetVolumeSelect        = 1,
  302.     kAudioGetMuteSelect            = 2,
  303.     kAudioSetMuteSelect            = 3,
  304.     kAudioSetToDefaultsSelect    = 4,
  305.     kAudioGetInfoSelect            = 5,
  306.     kAudioGetBassSelect            = 6,
  307.     kAudioSetBassSelect            = 7,
  308.     kAudioGetTrebleSelect        = 8,
  309.     kAudioSetTrebleSelect        = 9,
  310.     kAudioGetOutputDeviceSelect    = 10,
  311.     kAudioMuteOnEventSelect        = 129
  312. };
  313.  
  314.  
  315.  
  316. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  317. /* Sound Manager 3.0 utilities*/
  318. extern pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  319.  FOURWORDINLINE(0x203C, 0x0614, 0x0018, 0xA800);
  320. extern pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  321.  FOURWORDINLINE(0x203C, 0x0218, 0x0018, 0xA800);
  322.  
  323.  
  324. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  325. /* basic sound component functions*/
  326. extern pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  327.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  328. extern pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  329.  FIVEWORDINLINE(0x2F3C, 8, 2, 0x7000, 0xA82A);
  330. extern pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  331.  FIVEWORDINLINE(0x2F3C, 8, 3, 0x7000, 0xA82A);
  332. extern pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  333.  FIVEWORDINLINE(0x2F3C, 4, 4, 0x7000, 0xA82A);
  334. extern pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  335.  FIVEWORDINLINE(0x2F3C, 8, 5, 0x7000, 0xA82A);
  336.  
  337.  
  338. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  339. /* junction methods for the mixer, must be called at non-interrupt level*/
  340. extern pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  341.  FIVEWORDINLINE(0x2F3C, 4, 0x0101, 0x7000, 0xA82A);
  342. extern pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  343.  FIVEWORDINLINE(0x2F3C, 4, 0x0102, 0x7000, 0xA82A);
  344.  
  345.  
  346. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  347. /* info methods*/
  348. extern pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  349.  FIVEWORDINLINE(0x2F3C, 12, 0x0103, 0x7000, 0xA82A);
  350. extern pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  351.  FIVEWORDINLINE(0x2F3C, 12, 0x0104, 0x7000, 0xA82A);
  352.  
  353.  
  354. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  355. /* control methods*/
  356. extern pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  357.  FIVEWORDINLINE(0x2F3C, 6, 0x0105, 0x7000, 0xA82A);
  358. extern pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  359.  FIVEWORDINLINE(0x2F3C, 6, 0x0106, 0x7000, 0xA82A);
  360. extern pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  361.  FIVEWORDINLINE(0x2F3C, 6, 0x0107, 0x7000, 0xA82A);
  362. extern pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  363.  FIVEWORDINLINE(0x2F3C, 12, 0x0108, 0x7000, 0xA82A);
  364.  
  365.  
  366. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  367. /* interface for Audio Components*/
  368. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  369.  
  370.  
  371. /*Volume is described as a value between 0 and 1, with 0 indicating minimum
  372.   volume and 1 indicating maximum volume; if the device doesn't support
  373.   software control of volume, then a value of unimpErr is returned, indicating
  374.   that these functions are not supported by the device*/
  375.  
  376.  
  377. extern pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  378.  FIVEWORDINLINE(0x2F3C, 6, 0, 0x7000, 0xA82A);
  379. extern pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  380.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  381.  
  382.  
  383. /*If the device doesn't support software control of mute, then a value of unimpErr is*/
  384. /*returned, indicating that these functions are not supported by the device*/
  385. extern pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  386.  FIVEWORDINLINE(0x2F3C, 6, 2, 0x7000, 0xA82A);
  387. extern pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  388.  FIVEWORDINLINE(0x2F3C, 4, 3, 0x7000, 0xA82A);
  389.  
  390.  
  391. /*AudioSetToDefaults causes the associated device to reset its volume and mute values*/
  392. /*(and perhaps other characteristics, e.g. attenuation) to "factory default" settings*/
  393. extern pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  394.  FIVEWORDINLINE(0x2F3C, 0, 4, 0x7000, 0xA82A);
  395.  
  396.  
  397. /*This routine is required; it must be implemented by all audio components*/
  398. extern pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  399.  FIVEWORDINLINE(0x2F3C, 4, 5, 0x7000, 0xA82A);
  400. extern pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  401.  FIVEWORDINLINE(0x2F3C, 6, 6, 0x7000, 0xA82A);
  402. extern pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  403.  FIVEWORDINLINE(0x2F3C, 4, 7, 0x7000, 0xA82A);
  404. extern pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  405.  FIVEWORDINLINE(0x2F3C, 6, 8, 0x7000, 0xA82A);
  406. extern pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  407.  FIVEWORDINLINE(0x2F3C, 4, 9, 0x7000, 0xA82A);
  408. extern pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  409.  FIVEWORDINLINE(0x2F3C, 4, 10, 0x7000, 0xA82A);
  410.  
  411.  
  412. /*This is routine is private to the AudioVision component.  It enables the watching of the mute key.*/
  413. extern pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  414.  FIVEWORDINLINE(0x2F3C, 2, 129, 0x7000, 0xA82A);
  415.  
  416.  
  417. enum {
  418.     uppSoundParamProcInfo = kPascalStackBased
  419.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  420.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SoundParamBlockPtr*)))
  421. };
  422.  
  423. #if GENERATINGCFM
  424. #define NewSoundParamProc(userRoutine)        \
  425.         (SoundParamUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundParamProcInfo, GetCurrentArchitecture())
  426. #else
  427. #define NewSoundParamProc(userRoutine)        \
  428.         ((SoundParamUPP) (userRoutine))
  429. #endif
  430.  
  431. #if GENERATINGCFM
  432. #define CallSoundParamProc(userRoutine, pb)        \
  433.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSoundParamProcInfo, (pb))
  434. #else
  435. #define CallSoundParamProc(userRoutine, pb)        \
  436.         (*(userRoutine))((pb))
  437. #endif
  438.  
  439.  
  440. #if PRAGMA_IMPORT_SUPPORTED
  441. #pragma import off
  442. #endif
  443.  
  444. #if PRAGMA_ALIGN_SUPPORTED
  445. #pragma options align=reset
  446. #endif
  447.  
  448. #ifdef __cplusplus
  449. }
  450. #endif
  451.  
  452. #endif /* rez */
  453. #endif /* __SOUNDCOMPONENTS__ */
  454.